package com.zeildx.glife;

import android.app.Application;
import android.os.AsyncTask;

import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.LiveData;

import com.zeildx.glife.database.WordDatabase;
import com.zeildx.glife.entity.Word;

import java.util.List;

public class LifeViewModel  extends AndroidViewModel{
    //private EventDao eventDao;
    //private LiveData<List<Event>>allEventsLive;
    private EventRepository eventRepository;
    public LifeViewModel(@NonNull Application application) {
        super(application);
        eventRepository = new EventRepository(application);

    }

    public LiveData<List<Event>> getAllEventsLive() {
        return eventRepository.getAllEventsLive();
    }

    public void insertEvents(Event... events){
        eventRepository.insertEvents(events);
    }
    public void deleteEvents(Event... events){ eventRepository.deleteEvents(events); }


}
